package com.erp.erp_dao.ProductMainInfo;

import com.erp.erp_entitys.ProductMainInfo.ProductMainInfoEntity;
import com.erp.erp_entitys.ProductMainInfo.ProductMainInfoExample;
import com.erp.erp_entitys.ProductMainInfo.ProductMainInfoVoEntity;
import com.erp.erp_entitys.ProductMainInfo.Req.*;
import com.erp.erp_entitys.ProductMainInfo.Res.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IProductMainInfoDAO {
    long countByExample(ProductMainInfoExample example);

    int deleteByExample(ProductMainInfoExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ProductMainInfoEntity record);

    int insertSelective(ProductMainInfoEntity record);

    List<ProductMainInfoEntity> selectByExample(ProductMainInfoExample example);

    ProductMainInfoEntity selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ProductMainInfoEntity record, @Param("example") ProductMainInfoExample example);

    int updateByExample(@Param("record") ProductMainInfoEntity record, @Param("example") ProductMainInfoExample example);

    int updateByPrimaryKeySelective(ProductMainInfoEntity record);

    int updateByPrimaryKey(ProductMainInfoEntity record);

    /**
     * 根据产品目录获取产品列表
     * @param catacode
     * @return
     */
    List<ProductMainInfoVoEntity> getVoByCatalog(String catacode);

    List<ProductMainInfoEntity> queryList(String w);


    /**
     * 根据条件查询产品
     * @param req
     * @return
     */
    List<ProductMainInfoEntity> findProductMainInfo(ProductMainInfoReq req);

    /**
     * 产品详情统计-集合
     * @param req
     * @return
     */
    List<productDetailStatisticsRes> productDetailStatisticsList(productDetailStatisticsReq req);
    /**
     * 按厂商产品分组详情-集合
     * @param req
     * @return
     */
    List<productGroupDetailStatisticsRes> productGroupDetailStatisticsList(productGroupDetailStatisticsReq req);
    /**
     * 产品采购Top-集合
     * @param req
     * @return
     */
    List<productPurchaseTopStatisticsRes> productPurchaseTopStatisticsList(productPurchaseTopStatisticsReq req);
    /**
     * 厂商产品排价-集合
     * @param req
     * @return
     */
    List<productPriceDetailStatisticsRes> productPriceDetailStatisticsList(productPriceDetailStatisticsReq req);

    /**
     * 停用产品
     * @param ids
     * @return
     */
    Integer deactivateProduct(@Param("ids") List<Integer> ids);

    /**
     * 产品未录入单价下采购单统计
     * @param req
     * @return
     */
    List<productNotEnteredPurchaseStatisticsRes> productNotEnteredPurchaseStatisticsList(productNotEnteredPurchaseStatisticsReq req);

}